{% extends "default/base.html" %} 
{% block title %}{{ title }}{% endblock %} 
{% block content %}
	{% if blog %}
          <div class="blog-post">
            <h2 class="blog-post-title">{{ blog.title }}</h2>
            <p class="blog-post-meta">
            	<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span><span class="blog-post-label">{{ blog.time|date:"Y-m-d" }}</span>
            	<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span><span class="blog-post-label">{{ blog.classify.content }}</span>
            	<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
            	{% for tag in blog.tags %}
				<span class="blog-post-tags"><a href="{%url 'tag' tag.id %}" title="{{tag.content}}" >{{tag.content}}</a></span>
				{%endfor%}
            </p>
           {% autoescape off %} {{ blog.content }} {% endautoescape %}
          </div><!-- /.blog-post -->
	{% else %}
		  <div class="blog-post">
              <p>NO PAGES NOW.</p>
          </div>
	{% endif %}
          <nav>
          	<blockquote>
          	{% if blog.preBlog %}
			<p>上一篇：<a href="{% url 'blog' blog.preBlog.id%}" title="上一篇：{{ blog.preBlog.title }}">{{ blog.preBlog.title }}</a></p>
			{% endif %}
			{% if blog.nextBlog %}
		 	<p>下一篇：<a href="{% url 'blog' blog.nextBlog.id%}" title="下一篇：{{ blog.nextBlog.title }}">{{ blog.nextBlog.title }}</a></p>
			{% endif %}
			</blockquote>
          </nav>
{% endblock %}
